﻿using System;
using CellarDoor.Gui.Elements;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace CellarDoor.Gui
{
    public class UiEventArgs : EventArgs
    {
        /// <summary>
        /// Gets the element that has initiatet the current running event.
        /// </summary>
        public UiElement Target { get; protected set; }

        /// <summary>
        /// Gets and sets a value indicating whether the event has been handeled or not.
        /// </summary>
        public bool Handeled { get; set; }

        public UiEventArgs(UiElement target)
        {
            Target = target;
        }
    }

    public class UiMouseArgs : UiEventArgs
    {

        public UiMouseProxy Mouse { get; protected set; }

        public UiMouseArgs(UiMouseProxy mouse, UiElement target)
            : base(target)
        {
            Mouse = mouse;
        }
    }

    public delegate void UiEventHandler(object sender, UiEventArgs args);
}
